<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>[|.pageTitle|]</title>
    [|if .zTree|]
    <link rel="stylesheet" href="/static/zTree3/css/demo.css?t=5" type="text/css">
    <link rel="stylesheet" href="/static/zTree3/css/zTreeStyle/zTreeStyle.css" type="text/css">
    [|end|]
    <meta charset="utf-8">
    <link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/css/main.css">
    <script src="/static/layui/layui.js?s=36"></script>
    <script src="/static/js/main.js?s=2124"></script>
    <script src="/static/js/echarts.js"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin" style="margin-top: 20px; align:left;">
    <form class="layui-form" >
        <div class="layui-input-inline">
            <div class="layui-inline">
                <label class="layui-form-label" >管理员：</label>
                <div class="layui-input-inline" >
                    <input type="text" class="layui-input" id="GMUserName" lay-verify="" style="width:100px">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label"  style="width:140px">玩家推广号：</label>
                <div class="layui-input-inline" >
                    <input type="number" class="layui-input" id="UserGameID" lay-verify="" style="width:100px">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">点控时间：</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" id="BeforDateTime" placeholder="" style="width:100px" readonly>
                </div>
                <label>-</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" id="AfterDateTime" placeholder="" style="width:100px" readonly>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">是否异常：</label>
                <div class="layui-input-inline" style="width:100px" >
                    <select  name = "isabnormal" id = "isabnormal" lay-verify=""   readonly>
                        <option value="">-请选择-</option>
                        <option value="0">是</option>
                        <option value="1">否</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">输赢：</label>
                <div class="layui-input-inline" style="width:100px" >
                    <select name = "userWinLose" id = "userWinLose" lay-verify="" readonly>
                        <option value="">-请选择-</option>
                        <option value="0">输</option>
                        <option value="1">赢</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="starquery">开始查询</button>
            </div>
        </div> 

        <br />
        <hr class="layui-bg-gray">
        <div>
            <p>
                <label id="" style="color:rgb(0, 0, 0);">玩家赢总金币：</label>
                <label id="UserData1" style="color:red;">0</label>
                <label id="" style="color:rgb(0, 0, 0);">,玩家输总金币：</label>
                <label id="UserData2" style="color:red;">0</label>
            </p>
        </div>

    </form>

    <table  class="layui-table" id="userinfotable" lay-size="sm" lay-filter="layfilteruserinfotable"> </table> 

</div>
<script>
    var $;

    layui.config({
            base : "js/"
    }).use(['form','element','layer','jquery','table','laydate'], function(){
        var table = layui.table;
        var element = layui.element;
        var form = layui.form;
        var laydate = layui.laydate;
        $ = layui.jquery;
    //监听表格复选框选择
   // table.on('checkbox(demo)', function(obj){
    //   console.log(obj);
   // });

    //监听工具条
      laydate.render({
        elem: '#BeforDateTime'
      });
    laydate.render({
        elem: '#AfterDateTime'
    });
    ShowTablesDatas(table)
    GetPageTitleData($)
    form.on('submit(starquery)', function(data) {
         
      ShowTablesDatas(table)
      GetPageTitleData($)
        
        return false;
    });

    //监听单元格事件
   // table.on('tool(layfilteruserinfotable)', function(obj){
     //   var data = obj.data;
     //   if(obj.event === 'UserInfo'){
      //      window.location.href="/usersfinduser/userinfopage.html?UserID=" + data.GID +"&UserNickName=" + data.UserNickName;
       //     return false;
       // }
     // });
   
    return false;
}); 


function ShowTablesDatas(thisTabble){
    var dGMUserName = document.getElementById("GMUserName");
    var dUserGameID =  document.getElementById("UserGameID");
    var dBeforDateTime =  document.getElementById("BeforDateTime");
    var dAfterDateTime =  document.getElementById("AfterDateTime");
    var disabnormal =  document.getElementById("isabnormal");
    var duserWinLose =  document.getElementById("userWinLose");
    thisTabble.render({
        elem:'#userinfotable'
        ,url:'/syscontrollog/gmrecordctrltable'
        ,where: {
                GMUserName:dGMUserName.value
                ,UserGameID: dUserGameID.value
                ,UserCkind:1
                ,BeforDateTime:dBeforDateTime.value
                ,AfterDateTime:dAfterDateTime.value
                ,isabnormal:disabnormal.value
                ,userWinLose:duserWinLose.value
       
        }
        ,cols: [[ //标题栏
        
            {field:'ugameID',title:'推广号',width:110}
            ,{field:'unickname',title:'昵称',width:140}
            ,{field:'GMUserName',title:'管理员',width:140}
            ,{field:'ctrlTime',title:'点控时间',width:180}
            ,{field:'Userwinlose',title:'输赢',width:110}
            ,{field:'oldrate',title:'旧作弊率',width:110}
            ,{field:'newrate',title:'新作弊率',width:110}
            ,{field:'ctrlscore',title:'点控分数',width:110}
            ,{field:'changlogs',title:'说明',width:460}
            ,{field:'reason',title:'理由',width:220}
                ]] 
        ,skin: 'row' //表格风格
        ,even: true
        ,page: true //是否显示分页
        ,limits: [50,100,200]
        ,limit: 100//每页默认显示的数量
        ,width: 'full-10'
        ,rules: 'all'
        ,height: 'full-210'
    });
}

function GetPageTitleData(postData){
   var dGMUserName = document.getElementById("GMUserName");
    var dUserGameID =  document.getElementById("UserGameID");
    var dBeforDateTime =  document.getElementById("BeforDateTime");
    var dAfterDateTime =  document.getElementById("AfterDateTime");
    var disabnormal =  document.getElementById("isabnormal");
    var duserWinLose =  document.getElementById("userWinLose");

    var jsData = {
        'GMUserName':dGMUserName.value
        ,'UserGameID': dUserGameID.value
        ,'UserCkind':2
        ,'BeforDateTime':dBeforDateTime.value
        ,'AfterDateTime':dAfterDateTime.value
        ,'isabnormal':disabnormal.value
        ,'userWinLose':duserWinLose.value
    }            

    postData.post('[|urlfor "UsersFinduserController.RecordCtrlTable"|]', jsData, function (out) {
        if(out.code == 0)
        {
            var dusercondition0 =  document.getElementById("UserData1");
            dusercondition0.innerHTML=out.data.DATA1;
            var dusercondition0 =  document.getElementById("UserData2");
            dusercondition0.innerHTML=out.data.DATA2;                                   
            return false;
        }
      
       layer.msg(out.message)
    }, "json");
}



</script>
</body>
</html>